package com.liang.date;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateDemo2 {
    public static void main(String[] args) throws ParseException {
        Date date = new Date();

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        System.out.println(sdf.format(date));

        String s = "2020-10-10 12:10:10";

        System.out.println(sdf.parse(s));

//        String s1 = "adasf";

        System.out.println(s.hashCode());

    }





}
